#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int lcm(int a, int b)
{
	int m = a * b;
	for (int i = max(a, b); i <= m; i++)
	{
		if (i % a == 0 && i % b == 0) 
		{
			return i;
		}
	}
	return -1;
}

int main()
{
	int a, b;
	cin >> a >> b;
	cout << lcm(a, b);
	return 0;
}